package com.aigis.big4.tmp.javase;


import java.util.*;


public class MapTest {
   public static void main(String[] args){
       Map<String,String> map=new HashMap<>();
       map.put("index1","data1");
       map.put("index2","data2");
       map.put("index3","data3");
       for (Map.Entry<String,String> entry:map.entrySet()){
           System.out.println(entry.getKey()+"  " +entry.getValue());
       }
       System.out.println(map);


       Set<String> test=new HashSet();
       test.add("小明");
       test.add("小夏");
       Iterator<String> it=test.iterator();
       while (it.hasNext()){
           String name=it.next();
           if (name.equals("小夏"));
            name="小菊";
       }
       System.out.println(test);
   }
}
